# Gunicorn configuration file
import multiprocessing

# Server socket
bind = "0.0.0.0:8000"
backlog = 2048

# Worker processes
workers = 1  # 开发调试时使用单个worker
worker_class = 'sync'
worker_connections = 1000
timeout = 120  # 增加超时时间
keepalive = 2

# Logging
accesslog = '-'
errorlog = '-'
loglevel = 'debug'  # 设置为debug级别
capture_output = True
enable_stdio_inheritance = True

# Process naming
proc_name = 'redbook'

# Server mechanics
daemon = False
pidfile = None
umask = 0
user = None
group = None
tmp_upload_dir = None

# SSL
keyfile = None
certfile = None

# Development settings
reload = True  # 启用自动重载
preload_app = False  # 禁用预加载
